Skip to content

Surface Reopen Closed Session in the new-session menu on Linux and Windows#9347

Open
mvanhorn wants to merge 1 commit intowarpdotdev:masterfrom
mvanhorn:mvanhorn/restore-closed-tab-ui-9120
Open

Surface Reopen Closed Session in the new-session menu on Linux and Windows#9347
mvanhorn wants to merge 1 commit intowarpdotdev:masterfrom
mvanhorn:mvanhorn/restore-closed-tab-ui-9120

Conversation

@mvanhorn
Copy link
Copy Markdown

Description

Issue #9120 reports that on Linux and Windows, the "Restore closed tab" action works via the keyboard shortcut (Ctrl+Alt+T) but has no UI affordance, so users can't discover it. macOS already exposes "Reopen closed session" through the application menu bar (app/src/app_menus.rs:1042-1056), but Linux and Windows have no such menu.

This adds a "Reopen closed session" entry as the last item in the new-session + dropdown (unified_new_session_menu_items) on every platform. Behavior matches the existing macOS menu entry: the item is greyed out when UndoCloseStack is empty, and the keybinding hint is sourced from the app:reopen_closed_session editable binding registered in app/src/undo_close/mod.rs. Adding it on macOS too gives parity for users who use the dropdown rather than the menu bar.

Testing

Added test_unified_new_session_menu_includes_reopen_closed_session in app/src/workspace/view_test.rs. The test:

  • Asserts the second-to-last item is a MenuItem::Separator.
  • Asserts the last item is "Reopen closed session" and dispatches WorkspaceAction::ReopenClosedSession.
  • Asserts the item is disabled when the UndoCloseStack is empty.
  • Adds a terminal tab, removes it, and asserts the item becomes enabled.

Verified locally with cargo nextest run -p warp test_unified_new_session_menu_includes_reopen_closed_session, cargo fmt -- --check, and cargo clippy -p warp --all-targets --tests -- -D warnings.

Server API dependencies

N/A. Pure UI change wired to an existing action.

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

Changelog Entries for Stable

CHANGELOG-BUG-FIX: Reopen Closed Session is now reachable from the new-session menu on Linux and Windows.

Fixes #9120

…ndows

The Ctrl+Alt+T / Cmd+Shift+T action to reopen the most recently closed
session was only discoverable through the macOS application menu bar
('app/src/app_menus.rs:1042'). On Linux and Windows, where there is no
menu bar entry, users had no UI affordance for the action.

Add a 'Reopen closed session' entry as the last item in the new-session
'+' dropdown ('unified_new_session_menu_items'). The behavior mirrors the
macOS menu entry: the item is greyed out when the UndoCloseStack is
empty, and the keybinding hint is sourced from the
'app:reopen_closed_session' editable binding. The entry is added on
every platform so macOS users get parity with the menu-bar entry from
the dropdown surface as well.

Add 'test_unified_new_session_menu_includes_reopen_closed_session' to
verify presence as the last item, the dispatched action, the empty-stack
disabled state, and the enabled state after a tab is closed.
@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented Apr 29, 2026

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @mvanhorn on file. In order for us to review and merge your code, each contributor must visit https://cla.warp.dev to read and agree to our CLA. Once you have done so, please comment @cla-bot check to trigger another check.

@oz-for-oss
Copy link
Copy Markdown

oz-for-oss Bot commented Apr 29, 2026

@mvanhorn

I'm starting a first review of this pull request.

You can follow along in the session on Warp.

I approved this pull request and requested human review from: @vorporeal, @alokedesai, @zachbai.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

I approved this pull request. No matching stakeholder was found for the changed files, so no human reviewers were requested.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR adds the existing Reopen closed session action to the unified new-session menu, includes the current keybinding hint, disables the item when the undo-close stack is empty, and adds coverage for the new menu ordering and enabled state.

Concerns

  • No blocking concerns found.

Verdict

Found: 0 critical, 0 important, 0 suggestions

Approve

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR adds a "Reopen closed session" item to the unified new-session menu, using the existing editable binding label, WorkspaceAction::ReopenClosedSession, and UndoCloseStack disabled state. The accompanying test covers the item placement, action, and disabled/enabled states.

Concerns

  • No blocking correctness or security concerns found in the changed lines.

Verdict

Found: 0 critical, 0 important, 0 suggestions

Approve

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Linux] "Restore closed tab" UI entry missing even though reopen shortcut works

1 participant